# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Mozilla-CA
pkgname=perl-${_realname}
pkgver=20180117
pkgrel=1
pkgdesc="Mozilla's CA cert bundle in PEM format"
arch=('any')
license=('GPL2' 'LGPL2.1')
options=(!emptydirs)
depends=('perl>=5.006')
url="https://metacpan.org/release/Mozilla-CA"
groups=('perl-modules')
source=("https://www.cpan.org/authors/id/A/AB/ABH/${_realname}-${pkgver}.tar.gz")
sha256sums=('f2cc9fbe119f756313f321e0d9f1fac0859f8f154ac9d75b1a264c1afdf4e406')

build() {
  cd ${_realname}-${pkgver}
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
}

check() {
  cd ${_realname}-${pkgver}
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
}

package() {
  cd ${_realname}-${pkgver}
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
